package com.zhouqinuan.spring.cloud.develop.framework.demo.mongodb.repository;

import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.Query;

import com.zhouqinuan.spring.cloud.develop.framework.demo.mongodb.document.UserDocument;

public interface UserDocumentRepository extends MongoRepository<UserDocument, String> {

    @Query(value = "{'name': ?0}", fields = "{'desc': 0}")
    UserDocument getByName(String name);
}
